package benchmarks.tpch.mongo.domain;

import java.util.Date;

public class Region extends TPCHDomain<Integer>{
//    TPCHLoaderMySQL.CastTypes.LONG,   // r_regionkey
//    TPCHLoaderMySQL.CastTypes.STRING, // r_name
//    TPCHLoaderMySQL.CastTypes.STRING  // r_comment
    private int r_regionkey; //1 //primary
    private String r_name; //2
    private String r_comment; //3

    @Override
    public void setInt(int pos, int value) {
        if (pos == 1) {
            r_regionkey = value;
        }
        else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDouble(int pos, double value) {
        System.out.println("Wrong pos");

    }

    @Override
    public void setString(int pos, String value) {
        if (pos == 2) {
            r_name = value;
        }
        else if (pos == 3) {
            r_comment = value;
        }
        else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDate(int pos, Date value) {
        System.out.println("Wrong pos");
    }

    @Override
    public Integer getPrimaryKey() {
        return r_regionkey;
    }

    public int getR_regionkey() {
        return r_regionkey;
    }

    public void setR_regionkey(int r_regionkey) {
        this.r_regionkey = r_regionkey;
    }

    public String getR_name() {
        return r_name;
    }

    public void setR_name(String r_name) {
        this.r_name = r_name;
    }

    public String getR_comment() {
        return r_comment;
    }

    public void setR_comment(String r_comment) {
        this.r_comment = r_comment;
    }
}
